package com.niit.order.service;

import com.niit.order.pojo.User;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author yaojianfeng
 */
public interface MyUserClient {
    /**
     * 根据ID获取用户信息
     *
     * @param id
     * @return
     */
    User findUserById(@PathVariable("id") String id);


    /**
     * request参数的请求
     *
     * @param name
     * @return
     */
    String requestParam(@RequestParam("name") String name);

    /**
     * header信息的请求
     *
     * @param name
     * @param address
     * @return
     */
    User headerInfo(@RequestHeader String name, @RequestHeader String address);

    /**
     * requestbody的请求
     *
     * @param user
     * @return
     */
    String bodyInfo(@RequestBody User user);
}
